<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateMemberTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('members', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->string('username',80)->index('username')->comment('用户名 ');
            $table->string('nickname')->nullable()->comment('用户昵称');
            $table->string('password')->comment('密码');
            $table->string('phone', 60)->unique()->comment("手机号");
            $table->string('email')->unique();
            $table->tinyInteger('status')->default(0)->index('status')->comment("0启用/1禁用");
            $table->timestamp('email_verified_at')->nullable();
            $table->rememberToken();
            $table->timestamps();
            $table->engine='InnoDB';
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('member');
    }
}